<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
        #all{
            height: 2000px
        }
    </style>
    <script  src="jquery-3.3.1.js"></script>
</head>
<body>
    <div>jiajiechishi</div>
     <div>   
        <ul>
            <li>1111</li>
            <li>2222</li>
            <li id='xx'>1111</li>
            <li>1111</li>
            <li>1111</li>
        </ul>
    </div>

</body>
</html>
<h2>This is a top title</h2>
<div id="all"></div>
<button type="button" onclick="window.scrollTo(0,0);">go top</button>
<button>改变背景颜色</button>
<script>
    var btn = document.querySelector('button');

    function random(number) {
        return Math.floor(Math.random() * (number + 1));
    }

    btn.onclick = function () {
        var rndCol = 'rgb(' + random(255) + ',' + random(255) + ',' + random(255) + ')';
        document.body.style.backgroundColor = rndCol;
    }
    // $(
    //     $("div").css('color','red'),
    //     $('li').css('color','blue'),
    // )
    $(
        $('div>li').css('backgroundColor','red')
    )
</script>